namespace NPack.Numeric
{
    internal struct NumericOperationsRealT<T> : INumericOperations<Real<T>, Real<T>, Real<T>>
    {

        #region INumericOperations<Real<T>,Real<T>,Real<T>> Members

        public Real<T> Add(Real<T> a, Real<T> b)
        {
            return a + b;
        }

        public Real<T> Sub(Real<T> a, Real<T> b)
        {
            return a - b;
        }

        public Real<T> Mul(Real<T> a, Real<T> b)
        {
            return a * b;
        }

        public Real<T> Div(Real<T> a, Real<T> b)
        {
            return a / b;
        }

        #endregion

        #region INumericOperations<Real<T>> Members

        public Real<T> Abs(Real<T> a)
        {
            return a.Abs();
        }

        public Real<T> Sqrt(Real<T> a)
        {
            return a.Sqrt();
        }

        public Real<T> Power(Real<T> l, double a)
        {
            return l.Power(a);
        }

        public Real<T> FromInt16(short a)
        {
            return NumericOperations<T, T, T, Real<T>>.FromInt16(a);
        }

        public Real<T> FromInt32(int a)
        {
            return NumericOperations<T, T, T, Real<T>>.FromInt32(a);
        }

        public Real<T> FromInt64(long a)
        {
            return NumericOperations<T, T, T, Real<T>>.FromInt64(a);
        }

        public Real<T> FromDouble(double a)
        {
            return NumericOperations<T, T, T, Real<T>>.FromDouble(a);
        }

        public Real<T> FromSingle(float a)
        {
            return NumericOperations<T, T, T, Real<T>>.FromSingle(a);
        }

        public Real<T> FromDecimal(decimal a)
        {
            return NumericOperations<T, T, T, Real<T>>.FromDecimal(a);
        }

        public short ToInt16(Real<T> a)
        {
            return a.ToInt16();
        }

        public int ToInt32(Real<T> a)
        {
            return a.ToInt32();
        }

        public long ToInt64(Real<T> a)
        {
            return a.ToInt64();
        }

        public double ToDouble(Real<T> a)
        {
            return a.ToDouble();
        }

        public float ToSingle(Real<T> a)
        {
            return a.ToSingle();
        }

        public decimal ToDecimal(Real<T> a)
        {
            return a.ToDecimal();
        }

        #endregion
    }
}